<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
  <head>
    <base href="<%=basePath%>" />
    <title>Role Authorization List</title>
    <script type="text/javascript">
		var path = "<%=basePath%>";
	</script>
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
	<meta http-equiv="description" content="This is my page" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>basic/css/content.css" />
	<!-- 页面特效 -->
	<jsp:include page="/basic/res-refer/page-effect-reference.jsp" />
	<!-- 用户访问菜单路径 -->
	<jsp:include page="/resources/usertrace/common-uservisit-reference.jsp" />
  </head>
  <script type="text/javascript">
  	$(function(){
  		$("input[name='query']").click(function(){
  			var roleID = $("input[name='roleID']").val();
  			window.location = path + "basic/roleAction!initialRoleAuthorize.do?roleID="+encodeURIComponent(roleID)+"&date="+new Date();
  		});
  	});
  	
  	/**
  	 * 角色用户、角色菜单授权
  	 */
  	function editRoleAuthority(roleUID) {
  		parent.window.frames["authorizeList"].location = path + "basic/roleAction!initialAuthorizeList.do?roleUID="+roleUID+"&date="+new Date();
  	}
  </script>
  <body>
  	<div class="content_all">
	  	<!--查询条件-->
	  	<div class="search">
	    	<form action=""><table cellpadding="0" cellspacing="0">
	      		<tr>
	        		<th>Role No.：</th>
			        <td><input name="roleID" value="<s:property value='roleID' />" type="text" class="s_input" /></td>
			        <td><input name="query" type="button" value="Query" class="s_btn" /></td>
	      		</tr>
	    	</table></form>
	  	</div>
	  	<!--查询列表-->
	  	<div class="search_table_all">
	    	<table class="search_table" cellspacing="0" cellpadding="0">
	      		<thead>
	        		<tr>
		          		<th style="width:50px;">Serial No.</th>
			          	<th>Role No.</th>
			          	<th>Role Name</th>
			          	<th>Operation</th>
	        		</tr>
	      		</thead>
	      		<tbody>
	      			<s:iterator value="roleList" var="role" status="status">
	      				<tr>
		          			<td><s:property value="#status.index+1" /></td>
		          			<td><s:property value="#role.roleID" /></td>
		          			<td><s:property value="#role.roleName" /></td>
		          			<td><a href="javascript:editRoleAuthority('<s:property value='#role.id' />')">[Edit]</a></td>
		        		</tr>
	      			</s:iterator>
	      		</tbody>
	    	</table>
	  	</div>
	</div>
  </body>
</html>
